<!-- {if $member_from eq 'seller'}-->
		{include file=member.header.html}
        <!--{else}-->
       {include file=buyer.header.html}
        <!--{/if}-->
<script type="text/javascript">
//注册表单验证
$(function(){
    $('#binding_form').validate({
        errorPlacement: function(error, element){
            $(element).next('.field_notice').hide();
            $(element).after(error);
        },
        success       : function(label){
            label.addClass('validate_right').text('OK!');
        },
        onkeyup: false,
        rules : {           
            email : {
                required : true,
                email    : true
            },
            captcha : {
                required : true,
                remote   : {
                    url : 'index.php?app=captcha&act=check_captcha',
                    type: 'get',
                    data:{
                        captcha : function(){
                            return $('#captcha1').val();
                        }
                    }
                }
            }
            
        },
        messages : {
            email : {
                required : '您必须提供您的电子邮箱',
                email    : '这不是一个有效的电子邮箱'
            },
            captcha : {
                required : '验证码不能为空',
                remote   : '验证码不正确'
            }
            
        }
    });
    $("#send_submit").click(function(){
        var email = $("#email").val();    
        var captcha = $('#captcha1').val();
        var is_captcha = false;
        if(captcha==''){
            alert('验证码不能为空'); 
            return;        
        }
        $.ajax({
            url:'index.php?app=captcha&act=check_captcha',
            async:false,
            type:"get",
            dataType:"json",
            data:'captcha='+captcha,
            success:function(data){
                if(!data){
                    alert('验证码不正确');
                    is_captcha = true ;
                }
  
            }
          }); 
        if(is_captcha){return;}   
        if(email && userValidate.chackEmail(email))
        {
           userValidate.sendEmail(email,'set_binging_email');
           return;

        }
  });
});
</script>

<!-- 内容 -->
<div class="content f-cb">
  <!-- 当前位置 -->
  {include file=path.html}
  <!-- 内容左边栏 -->
  <!-- {if $member_from eq 'seller'}-->
		{include file=member.menu.html}
        <!--{else}-->
        {include file=member.menu.buyer.html}
        <!--{/if}-->
  <!-- 内容右边栏 -->
  <!-- 第一步 -->
  <!-- {if $step eq 1}--> 
  <div class="right_content">
  <div class="t_1">绑定邮箱</div>
  <div class="step_set bg_png step_set_current_2_1"><span class="step_set_2_1 current">1 邮箱验证</span><span class="step_set_2_2">2 绑定完成</span></div>
  </div>
  <div class="con-receive-r b-radius safety_content">
    <div class="eject_con">
      <div class="add safety_modify_password">
        <form method="post"  action="" id="binding_form">
          <ul>
            <li>
              <h3>邮箱地址: </h3>
              <p><input type="text" class="text width_normal b-radius" id="email" name="email" /></p>
            </li>
            <li>
              <h3>验证码: </h3>
              <p>
              <input type="text" name="captcha" class="text width2 b-radius" id="captcha1">
                &nbsp;&nbsp;
                <a href="javascript:change_captcha($('#captcha'));" class="renewedly" title="点击换一张"><img alt="点击换一张" id="captcha" src="index.php?app=captcha&amp;{$random_number}"></a>
              </p>
            </li>
          </ul>
          <div class="submit submit_1">
            <input type="button" class="subbtn b-radius" id="send_submit" value="发送验证链接" />
            <br/>
              <br/>
              <a style="display:none;" href="http://mail.qq.com" target="_blank" class="linkbtn" id="gotoemail">验证邮件已发送！前往查看</a>
            </div>
        </form>
      </div>
    </div>
  </div>
  <!--{/if}-->
  <!-- 完成 -->
  <!-- {if $step eq 2}--> 
  <div class="right_content">
  <div class="t_1">绑定邮箱</div>
  <div class="step_set bg_png step_set_current_2_2"><span class="step_set_2_1">1 邮箱验证</span><span class="step_set_2_2 current">2 绑定完成</span></div>
  </div>
  <div class="con-receive-r b-radius safety_content">
    <div class="eject_con">
      <div class="add safety_modify_password">
        <div class="set_succeed"><h3>邮箱绑定成功 <br /><span class="coe6">新绑定邮箱：{$accout_data.binding_email}</span></h3><p class="linkbtn"><a href="index.php?app=account_security&from={$member_from}">返回安全设置</a></p></div>
      </div>
    </div>
  </div>
  <!--{/if}-->
</div>
<!-- 页脚 -->
{include file=footer.html}